package com.itrip.controller;

import com.itrip.pojo.ItripHotelRoom;
import com.itrip.pojo.ItripUser;
import com.itrip.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import javax.annotation.Resource;
import java.util.List;

@ApiIgnore
@RestController
public class UserController {
    @Resource
    private UserService userService;

    @RequestMapping("/view/findAll")
    public Object findAll(){
        List<ItripUser> userList =  userService.findAll();

        return userList;
    }

    @RequestMapping("/updateRoomBook")
    public Object updateRoomBook(ItripHotelRoom room){
        int count = userService.updateRoomBook(room);

        return count;
    }

}
